POV-Ray : Newsgroups : povray.general : merge : Re: merge Server Time
4 Nov 2024 19:22:53 EST (-0500)
  Re: merge  
From: Thorsten Froehlich
Date: 30 Sep 2003 17:00:15
Message: <3f79eedf@news.povray.org>
In article <3f793c99$1@news.povray.org> , "Barron Gillon" 
<gil### [at] purdueedu> wrote:

> Out of curiosity: does anyone know the time complexity of merge?  Is it O(n)
> or O(n^2)?

It seems you have the misconception that the merge algorithm would be slow
somehow, but this is ray-tracing, there is no tesselation and thus a merge
is now slower than any other object.  However, the automatic bounding built
into POV-Ray can compute only one unified bound for the merge, whiule with
many individual objects it can compute optimal bounding for every swingle
objects.  As finding the intersection is faster for well-bound objects, and
POV-ray does not bound the objects inside the merge, tracing takes longer as
more objects beed to be tested.  There is no way around, only adding a
manual bound if you can come up with a more efficient one.

BTW, if you just want to move non-intersecting objects as if they were one
objects, use "union" not "merge"!

    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.